<?php
//初始化
require(dirname(__FILE__) . '/includes/init.php');
if ($_REQUEST['act'] == 'add'){
	$provider = $_REQUEST['provider'];
	$products_name = $_REQUEST['products_name'];
	$link = $_REQUEST['link'];
	$start_time = $_REQUEST['start_time'];
	$sql = "INSERT INTO " .$ecs->table('yhd_group'). "(provider,products_name,link,start_time)".
                "VALUES ('".$provider."','".$products_name."','".$link."','".$start_time."')";
    $db->query($sql);
	//header("Location: shortNote_list.php\n");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>管理中心 - 一号店团购添加 </title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/general.css" rel="stylesheet" type="text/css" />
<link href="styles/main.css" rel="stylesheet" type="text/css" />
<link href="js/calendar/calendar.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/calendar/calendar.js"></script>
<script type="text/javascript" src="js/calendar.php?lang=zh"></script>
</head>
<body>
<h1>
<span class="action-span1"><a href="index.php?act=main">管理中心</a> </span><span id="search_id" class="action-span1"> -  一号店团购添加 </span>
<div style="clear:both"></div>
</h1> 
<div class="tab-div">
 <form enctype="multipart/form-data" action="" method="post" name="theForm" onsubmit="return group_yz()">
        <table width="50%" id="general-table" align="center">
          <tr>
            <td class="label">商家：</td>
            <td><input type="text" name="provider" id="provider" /></td>
          </tr>
          <tr>
            <td class="label">产品：</td>
            <td><input type="text" name="products_name" size="60" id="products_name"/></td>
          </tr>
		  <tr>
            <td class="label">链接：</td>
            <td><input type="text" name="link" size="60" id="link"/></td>
          </tr>
		  <tr>
		  	<td class="label">起始时间：</td>
			<td><input type="text" name="start_time"  id="start_time" size="10" readonly="readonly"/><input name="selbtn1" type="button" id="selbtn1" onclick="return showCalendar('start_time', '%Y-%m-%d %H:%M', '24', false, 'selbtn1');" value="选择" class="button"/></td>
		  </tr>
        </table>
 
        <div class="button-div">
		  <input type="hidden" value="add" name="act" />
          <input type="submit" value=" 确定 " class="button" />
          <input type="reset" value=" 重置 " class="button" />
        </div>
      </form>
</div>
</body>
</html>